<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

    <head>
        <meta charset="UTF-8">
        <title>职管用管理端平台</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="description" content="">
        <meta name="keywords" content="coco bootstrap template, coco admin, bootstrap,admin template, bootstrap admin,">
        <meta name="author" content="Huban Creative">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

        <!-- Base Css Files -->
        <link href="<?php echo __BOOTSTRAP__;?>css/bootstrap.min.css" rel="stylesheet" />
        <link href="<?php echo __CSS__;?>font-awesome/css/font-awesome.min.css" rel="stylesheet" />
        <link href="<?php echo __CSS__;?>fontello/css/fontello.css" rel="stylesheet" />

        <!-- Extra CSS Libraries Start -->
        <link href="<?php echo __CSS__;?>style.css" rel="stylesheet" type="text/css" />
        <link href="<?php echo __CSS__;?>jquery.datetimepicker.css" rel="stylesheet" type="text/css" />

        <link rel="stylesheet" href="<?php echo __CSS__;?>map_toolbar.css"/>
        <!-- Extra CSS Libraries End -->
        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->

        <link rel="shortcut icon" href="<?php echo __IMG__;?>Besiness/favicon.ico">
        <script type="text/javascript" src="<?php echo __LIBS__;?>jquery/jquery-1.11.1.min.js"></script>
        <!--validform-->
        <link rel="stylesheet" type="text/css" href="<?php echo __LIBS__;?>validform/css/style.css"  />
        <script type="text/javascript" src="<?php echo __LIBS__;?>validform/js/Validform_v5.3.2.js"></script>
    </head>

    
        <!-- Start content-->
        <div class="content">
            <div class="widget">
                <div class="widget-header transparent">
                    <h2><strong>发布任务</strong></h2>
                </div>
                <div class="widget-content padding">
                    <form class="form-horizontal demoform" role="form" method="post" action="<?php echo U('admin/company/task_add');?>">
                        <input type="hidden" name='sid' value='<?php echo ($sid); ?>' />
                        <input type="hidden" name='bus_id' value='<?php echo ($bus_id); ?>' />
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span>*</span>任务名称：</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control empty" id="app-name" maxlength="15"  name="tname" value="<?php echo ($data["tname"]); ?>" placeholder="请输入任务名称">
                                <span class="Validform_checktip"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span>*</span>联系人：</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control empty" id="app-name" maxlength="15"  name="linkman" value="<?php echo ($data["linkman"]); ?>" placeholder="请输入联系人">
                                <span class="Validform_checktip"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span>*</span>联系电话：</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control empty" id="app-name" maxlength="15"  name="linktel" value="<?php echo ($data["linktel"]); ?>" placeholder="请输入联系电话">
                                <span class="Validform_checktip"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span>*</span>服务内容：</label>
                            <div class="col-sm-6">
                               <!-- <select class="form-control empty" name="content">                                                                   
                                    <option value="0" selected="selected">- 请选择：服务内容 -</option>--> 
                                    <?php if(is_array($position)): foreach($position as $key=>$p): ?><input type='checkbox' value='<?php echo ($p); ?>' name="content[]"><?php echo ($p); endforeach; endif; ?>
                               <!-- </select>-->
                            </div>
                        </div>
                        <!--<div class="form-group">
                            <label class="col-sm-2 control-label"><span>*</span>职位薪酬：</label>
                            <div class="col-sm-6">
                                <input type="text" name="money" value="<?php echo ((isset($job["money"]) && ($job["money"] !== ""))?($job["money"]):'0.00'); ?>" style="width:100px;" class="form-control number" placeholder="请输入职位薪酬">
                                <span class="it_ar">元/天</span>
                                <span id="unit" class="label label-success btn-left it_ar it_unit">更改单位</span>
                                <span class="Validform_checktip"></span>
                            </div>
                        </div>-->
                        <!-- <div class="form-group">
                             <label class="col-sm-2 control-label"><span>*</span>结算方式：</label>
                             <div class="col-sm-6">
                                 <select class="form-control empty" name="pay_type">
                                     <option value="0">- 请选择：结算方式 -</option>                                                                  
                                     <?php if(is_array($settle)): foreach($settle as $k=>$pt): ?><option value="<?php echo ($k); ?>"<?php if($job['pay_type'] == $k): ?>selected="selected"<?php endif; ?>><?php echo ($pt); ?></option><?php endforeach; endif; ?>
                                 </select>
                             </div>
                         </div>
                         <div class="form-group">
                             <label class="col-sm-2 control-label"><span>*</span>APP发布效果字：</label>
                             <div class="col-sm-10">
                                 <input type="text" maxlength="1" value="" class="col-time app_size" />
                             </div>
                         </div>
                         <div class="form-group">
                             <label class="col-sm-2 control-label">发布效果图展示：</label>
                             <div class="col-sm-10">
                                 <span class="app_img"></span>
                             </div>
                         </div>-->
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span>*</span>工作地点：</label>
                            <div class="col-sm-10" id="city_2">
                                <select class="prov empty" data-name="省" data-bind="<?php echo ($job["province"]); ?>" name="province"></select>
                                <select class="city empty" data-name="市" data-bind="<?php echo ($job["city"]); ?>" name="city" style="display:none;"></select>
                                <select class="county empty" data-name="区/县" data-bind="<?php echo ($job["district"]); ?>" name="district" style="display:none;"></select>
                                <select class="street" data-name="街道" style="display:none;"></select>
                                <span class="Validform_checktip"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span>*</span>具体地址：</label>
                            <div class="col-sm-10">
                                <input type="text" name="address" class="form-control empty" maxlength="30" value="<?php echo ($job["address"]); ?>" placeholder="请输入具体地址"><span class="it_ar">注：最多输入30个汉字，包括数字。</span>
                                <span class="Validform_checktip"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span>*</span>指派会员：</label>
                            <div class="col-sm-10"><!--value="<?php echo ($data["uids"]); ?>"-->
                                <input type="text" name="uid" id="zpname"  value="" class="form-control empty" placeholder="" data-url="/Admin/company/get_users/p/1"/>
                                <input type="hidden" name="uids" value="" id="zhipai"/>
                                <span class="Validform_checktip"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span>*</span>工作日期：</label>
                            <div class="col-sm-6">
                                <input class="col-time" name="work_time" id="datetimepicker2" />

                            </div>
                        </div>
                        <!--<div class="form-group">
                             <label class="col-sm-2 control-label"><span>*</span>工作频率：</label>
                             <div class="col-sm-6">
                                 <input class="col-time" name="rate"/>次
                             </div>
                         </div>-->
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span>*</span>工作时间：</label>
                            <div class="col-sm-6">
                                <input class="col-time" name="work_time_start" value="<?php echo (date('H:i:s',$job["work_time_start"])); ?>" id="datetimepicker" type="text" value="6:00" />
                                至&nbsp;&nbsp;<input class="col-time" name="work_time_end" value="<?php echo (date('H:i:s',$job["work_time_end"])); ?>" id="datetimepicker1" type="text" value="21:00" />
                            </div>
                        </div>

                        <!--<div class="form-group">

                            <label class="col-sm-2 control-label">地图定位：</label>
                            <input type="hidden" class="form-control" id="map_lat" name="lat" value="" />
                            <input type="hidden" class="form-control" id="map_lng" name="lng" value="" /> 

                            <div  class="col-sm-10" id="container" >
                                <div id="myPageTop">
                                    <table>
                                        <tr>
                                            <td>
                                                <label>按关键字搜索：</label>
                                            </td>
                                            <td class="column2">
                                                <label>左击获取经纬度：</label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <input type="text" placeholder="请输入关键字进行搜索" id="tipinput">
                                            </td>
                                            <td class="column2">
                                                <input type="text" readonly="true" id="lnglat">
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </div>-->
                        <hr>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button id="inbut" type="submit" class="btn btn-success">保存并发送</button>
                                <button type="button" onclick="window.history.back(-1);" class="btn btn-default">返回</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <!-- Footer Start -->
            <div class="footer">Copyright &copy; 2016 河南职管用信息技术有限公司</div>
            <!-- Footer End -->
        </div>
        <div class="set-box">
            <!--checkbox css-->
            <link href="<?php echo __CSS__;?>style.css" rel="stylesheet" type="text/css" />
            <link rel="stylesheet" href="<?php echo __CSS__;?>_all.css">
            <div class="widget">
                <div class="widget-header transparent">
                    <h2><strong>指派人员</strong></h2>
                </div>
                <div class="data-table-toolbar table-size">
                    <label class="table-select">姓名：</label>
                    <input type="text" class="form-control" placeholder="职位名称">
                    <button type="submit" class="table-select btn btn-success">查询</button>
                </div>
                <div class="table-responsive">
                    <table class="table table-hover table-striped">
                        <thead>
                            <tr class="hang">
                                <th>点击签约</th>
                                <th>姓名</th>
                                <th>电话</th>
                                <th>地址</th>
                                <th>状态</th>
                            </tr>
                        </thead>
                        <tbody>
                        </tbody>
                    </table>
                    <hr/>
                    <div class="form-group">
                        <div class="col-sm-10" style="padding-left:30px;">
                            <button type="button" class="btn btn-default layui-layer-close">取消</button>
                        </div>
                    </div>
                </div>
                <div class="my_page">
                    <span class="current" data-url="/Admin/company/get_users/p/1" onclick="iszp(this)">上一页</span>
                    <span class="current" data-url="/Admin/company/get_users/p/2" onclick="iszp(this)">下一页</span>
                </div >
            </div>
            <script type ="text/javascript" src="<?php echo __JS__;?>common.js"></script>
            
        </div>
        <script type="text/javascript">
            	var html="";
            	$.ajax({
			    	async:"flase",
			        type: "get",
			        url: "/Admin/company/get_users/p/1",
			        success: function (data) {
			        	console.log(data);
			            var list = eval(data);
			            var objid = list.list;
			            for (i = 0; i < objid.length; i++) {
			                html += '<tr><td style="width:100px;"><div onclick="checkbox(this);" class="icheckbox_square-aero" data-bind="' + objid[i].uid + '" data-name="' + objid[i].username + '"></div></td><td style="width:120px;">' + objid[i].username + '</td><td>' + objid[i].mobile + '</td><td class="isaddress" style="width:225px;" title="' + objid[i].address + '"> ' + objid[i].address + '</td><td class="iswork" data-work="' + objid[i].is_work + '"></td></tr>'
			            }
			            $("tbody").html(html);
			            $(".iswork").each(function () {
			                var obj = $(this);
			                if (obj.data("work") == 0||obj.data("work")==null||obj.data("work")==3) {
			                    obj.html('<span class="label label-success">没有任务</span>');
			                } else {
			                    obj.html('<span class="label label-danger">已有任务</span>');
			                    obj.parents("tr").find(".icheckbox_square-aero").remove();
			                }
			            });
			            
						console.log(html);
						
			        },
			        error: function () {},
			    });
            </script>
        <!-- End content-->
        <!--data 时间-->
        <script type="text/javascript" src="<?php echo __JS__;?>jquery.datetimepicker.full.js"></script>

        <script type="text/javascript" src="<?php echo __JS__;?>common.js"></script>         
        <script type="text/javascript" src="<?php echo __JS__;?>admin_common.js"></script>  
        <!-- 高德地图 -->
        <!--<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=7d2964c7485090d75aed48f279796a49&plugin=AMap.Autocomplete"></script>
        <script type="text/javascript" src="http://cache.amap.com/lbs/static/addToolbar.js"></script>-->
        <script>/*
                        $(".set-box .my_page span").eq(0).click();
                        //高德地图start
                        var map = new AMap.Map('container');
                        map.setZoom(20); //设置缩放比例
                        map.setCenter([113.837432, 34.572981]); //初始中心点
                        //配置 - 中心点                     
                        var content = document.createElement('div');
                        content.innerHTML = '职管用';
                        content.className = 'map_tag';
                        //初始点标记
                        var marker = new AMap.Marker({
                            title: '职管用',
                            position: [113.837432, 34.572981],
                            map: map
                        });
                        //为地图注册click事件获取鼠标点击出的经纬度坐标
                        var clickEventListener = map.on('click', function (e) {
                            marker.setPosition([e.lnglat.getLng(), e.lnglat.getLat()]); //更新点标记位置
                            document.getElementById("map_lat").value = e.lnglat.getLat();
                            document.getElementById("map_lng").value = e.lnglat.getLng();
                            document.getElementById("lnglat").value = e.lnglat.getLng() + ',' + e.lnglat.getLat();
                        });
                        var auto = new AMap.Autocomplete({
                            input: "tipinput"
                        });
                        AMap.event.addListener(auto, "select", select); //注册监听，当选中某条记录时会触发
                        function select(e) {
                            if (e.poi && e.poi.location) {
                                map.setZoom(15);
                                map.setCenter(e.poi.location);
                            }
                        }
                        //end 高德地图
                        $(function () {
                            $('#datetimepicker,#datetimepicker1').datetimepicker({
                                datepicker: false,
                                format: 'H:i',
                                step: 5,
                            });
                            $('#datetimepicker2').datetimepicker({
                                timepicker:false, 
                                format: 'Y-m-d',
                            });
                            $(".tags_submit").click(function () {
                                var obj = $("#add_tags").val();
                                if (obj != "" && obj != undefined) {
                                    $(".tags_more").append('<a class="btn btn-green-1 but-top btn-right">' + obj + '</a>');
                                    $("#tags").val($("#tags").val() + obj + ",");
                                    $("#add_tags").val("");
                                }
                            });
                            $(".tags_more").on("mouseenter", "a", function () {
                                $(this).append('<i class="icon icon-cancel-3"></i>');
                            });
                            $(".tags_more").on("mouseleave", "a", function () {
                                $(this).find("i").remove();
                            });
                            $(".tags_more").on("click", "a i", function () {
                                $(this).parents("a").remove();
                                $("#tags").val("");
                                $(".tags_more a").each(function () {
                                    var obj = $(this).html();
                                    $("#tags").val($("#tags").val() + obj + ",")
                                });
                            });
                            //单位
                            $("#unit").bind("click", function () {
                                var obj = $(this);
                                if (obj.hasClass("it_unit")) {
                                    obj.after('<input class="form-control col-sm-2 btn-left" type="text" maxlength="3" value="" />');
                                    obj.prev(".it_ar").hide();
                                    obj.removeClass("it_unit").addClass("it_ture").html("确认更改");
                                } else {
                                    var name = obj.next().val();
                                    if (name == "") {
                                        obj.prev(".it_ar").show();
                                        obj.next().remove();
                                        obj.removeClass("it_ture").addClass("it_unit").html("更改单位");
                                    } else {
                                        obj.removeClass("it_ture").addClass("it_unit").html("更改单位");
                                        obj.prev(".it_ar").html(name).show();
                                        obj.next().remove();
                                    }
                                }
                            });
                            $("#app-name").bind("blur", function () {
                                var obj = $(this);
                                if (!(obj.val() == "")) {
                                    var name = obj.val().split("", 1);
                                    $(".app_size").val(name);
                                    $(".app_img").html(name);
                                }
                            });
                        });*/
        </script>
    

</html>